<form id="add-form" class="form-horizontal mf-form" role="form" data-toggle="validator" method="POST" action="">
    <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak={:config('site.configgroup')['baidu_ak']}"></script>
    <style>
        input.input-short{width:80px !important}
        td.mf-td-title{vertical-align: middle !important;}
    </style>
    <div>
        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">基本信息</a></li>
            <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">楼盘介绍</a></li>
            <li role="presentation"><a href="#picture" aria-controls="picture" role="tab" data-toggle="tab">封面图片</a></li>
        </ul>
        
        <!-- Tab panes -->
        <div class="tab-content">
            <div role="tabpanel" class="tab-pane active" id="home">
                <table class="table">
                    <tr>
                        <td>
                            <table class="table table-borderd">
                                <tr>
                                    <td class="mf-td-title">{:__('Building_name')}:</td>
                                    <td class="mf-td-input"><input id="c-building_name" data-rule="required"  class="form-control input-middle" name="row[building_name]" type="text"><a href="javascript:;" class="link-map">定位</a></td>
                                    <td class="mf-td-title" >{:__('Area')}:</td>
                                    <td class="mf-td-input" style="position:relative;"> 
                                        <input id="c-area" class="form-control" style="width:200px"  data-toggle="city-picker" name="row[area]">
                                    </td>   
                                    <td class="mf-td-title">经纬度:</td>
                                    <td class="mf-td-input">
                                            <input id="c-lng" class="form-control input-short" style="width:100px" name="row[lng]" type="number">
                                            <label>-</label>
                                            <input id="c-lat" class="form-control input-short" style="width:100px" name="row[lat]" type="number">
                                    </td>                                               
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Address')}:</td>
                                    <td class="mf-td-input"><input id="c-address" class="form-control input-middle" name="row[address]" type="text"></td>
                                    <td class="mf-td-title">是否置顶:</td>
                                    <td class="mf-td-input"><label><input name="row[is_top]" type="radio" value="1" />置顶</label> <label><input name="row[is_top]" type="radio" value="0" checked />不置顶</label></td>
                                    <td class="mf-td-title">接待时间:</td>
                                    <td class="mf-td-input">
                                        <input id="c-work_begin"  class="form-control input-middle datetimepicker" name="row[work_begin]" data-date-format="HH:mm:ss" data-use-current="true" name="row[work_begin]" type="text" value="{:date('H:i:s')}" style="width:100px">
                                        <label>-</label>
                                        <input id="c-work_end" class="form-control input-middle datetimepicker" data-date-format="HH:mm:ss" data-use-current="true" name="row[work_end]" type="text" value="{:date('H:i:s')}" style="width:100px">
                                    </td>   
                                </tr>
                                <tr>
                                    <td class="mf-td-title">标签:</td>
                                    <td class="mf-td-input" colspan="3"><input type="text" name="row[labels]"  data-source="newhouse/building/labels/index" data-primary-key="id" data-field="label_name"   data-multiple="true" class="form-control selectpage"  /> </td>   
                                    <td class="mf-td-title">开发商账号:</td>
                                    <td class="mf-td-input"><input type="text" name="row[developer_adminid]" data-source="auth/admin/selectlist" data-primary-key="id" data-field="username" data-multiple="false" class="form-control selectpage" /> </td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Contact_tel')}:</td>
                                    <td class="mf-td-input"><input id="c-contact_tel"  class="form-control input-middle" name="row[contact_tel]" type="text"></td>
                                    <td class="mf-td-title">有效期:</td>
                                    <td class="mf-td-input">
                                            <input id="c-validate_begin" class="form-control input-middle datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[validate_begin]" type="text" value="{:date('Y-m-d')}"  style="width:100px">
                                            <label>-</label>
                                            <input id="c-validate_end" class="form-control input-middle datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[validate_end]" type="text" value="{:date('Y-m-d')}"  style="width:100px">
                                    </td>
                                    <td class="mf-td-title">代理商账号:</td>
                                    <td class="mf-td-input"><input type="text" name="row[agent_adminid]" data-source="auth/admin/selectlist" data-primary-key="id" data-field="username" data-multiple="false" class="form-control selectpage" /> </td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Last_sell')}:</td>
                                    <td class="mf-td-input"><input id="c-last_sell" class="form-control input-middle datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[last_sell]" type="text" value="{:date('Y-m-d')}"></td>
                                    <td class="mf-td-title">{:__('Get_date')}:</td>
                                    <td class="mf-td-input"> <input id="c-get_date" class="form-control input-middle datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[get_date]" type="text" value="{:date('Y-m-d')}"></td>   
                                    <td class="mf-td-title">{:__('Property_year')}:</td>
                                    <td class="mf-td-input">  <input id="c-property_year" class="form-control input-middle" name="row[property_year]" type="number"></td>   
                                </tr>
                                
                                <tr>
                                    <td class="mf-td-title">{:__('Volume_ratio')}:</td>
                                    <td class="mf-td-input"> <input id="c-volume_ratio" class="form-control input-middle" name="row[volume_ratio]" type="number"></td>
                                    <td class="mf-td-title">{:__('Property_fee')}:</td>
                                    <td class="mf-td-input"> <input id="c-property_fee" class="form-control input-middle" name="row[property_fee]" type="number"></td> 
                                    <td class="mf-td-title">{:__('Greening_rate')}:</td>
                                    <td class="mf-td-input"><input id="c-greening_rate" class="form-control input-middle" name="row[greening_rate]" type="number"></td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Parking_spaces')}:</td>
                                    <td class="mf-td-input">  <input id="c-parking_spaces" class="form-control input-middle" name="row[parking_spaces]" type="number"></td>   
                                    <td class="mf-td-title">{:__('House_quantity')}:</td>
                                    <td class="mf-td-input"><input id="c-house_quantity" class="form-control input-middle" name="row[house_quantity]" type="number"></td>
                                    <td class="mf-td-title">{:__('Developer')}:</td>
                                    <td class="mf-td-input"> <input id="c-developer" class="form-control input-middle" name="row[developer]" type="text"></td>   
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Property_company')}:</td>
                                    <td class="mf-td-input"><input id="c-property_company" class="form-control input-middle" name="row[property_company]" type="text"></td>
                                    <td class="mf-td-title">{:__('Scene_person')}:</td>
                                    <td class="mf-td-input">  <input id="c-scene_person" class="form-control input-middle" name="row[scene_person]" type="text"></td>   
                                    <td class="mf-td-title">{:__('Scene_person_tel')}:</td>
                                    <td class="mf-td-input"><input id="c-scene_person_tel"  class="form-control input-middle" name="row[scene_person_tel]" type="text"></td>
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('Average_price')}:</td>
                                    <td class="mf-td-input"><input id="c-average_price"  class="form-control input-middle" name="row[average_price]" type="number"></td>
                                    <td class="mf-td-title">{:__('Reporting_policy')}:</td>
                                    <td class="mf-td-input" colspan="3"><input id="c-reporting_policy" class="form-control input-long" name="row[reporting_policy]" type="text"></td>   
                                </tr>
                                <tr>
                                    <td class="mf-td-title">{:__('On_selling')}:</td>
                                    <td class="mf-td-input" colspan="5"> <textarea id="c-on_selling" class="form-control " rows="5" name="row[on_selling]" cols="50"></textarea></td>   
                                </tr>
                            </table>
                        </td>
                        <td style="width:350px">
                            <div id="cop-map-container" style="height:480px;width:360px"></div> 
                        </td>
                    </tr>
                </table>
            </div>
            <div role="tabpanel" class="tab-pane" id="profile">
                <textarea id="c-introduction" class="form-control editor" name="row[introduction]" ></textarea>
            </div>
            <div role="tabpanel" class="tab-pane" id="picture">
                <div class="row margin">
                    <div class="col col-xs-2 text-left">
                        <div class="input-group">
                            <input id="c-picture" name="row[picture]" type="hidden">
                            <div class="input-group-addon no-border no-padding">
                                <span><button type="button" id="plupload-picture" class="btn btn-danger plupload" data-input-id="c-picture" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-picture"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                                <span><button type="button" id="fachoose-picture" class="btn btn-primary fachoose" data-input-id="c-picture" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col col-xs-12 text-left">
                        <span class="msg-box n-right" for="c-picture"></span>
                        <ul class="row list-inline plupload-preview" id="p-picture"></ul> 
                    </div>
                </div>
            </div>
        </div>
    </div>
                        

    

    <div class="form-group layer-footer">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8 text-right">
                    <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
            </div>
    </div> 
</form>
